﻿// EXP0113.cpp : 使用for循环重做1.4.1节中的所有练习（第11页）。
//

#include <iostream>
using namespace std;
void func1()
{
    int sum = 0;
    for (int i = 50; i <= 100; ++i)
    {
        sum += i;
    }
    cout << "sum=" << sum << endl;
}
void func2()
{
	for (int i = 10; i >=0; --i)
	{
        cout << i << endl;
	}
    
}
void func3()
{
    cout << "输入两个整数" << endl;
    int a, b;
    cin >> a >> b;
    cout << "=========================" << endl;
    int max = a > b ? a : b;
    int min = a < b ? a : b;
    for (int i = min; i < max + 1; ++i)
    {
        cout << i << endl;
    }
    
}
int main()
{
    func1();
    cout << "=========================" << endl;
    func2();
    cout << "=========================" << endl;
    func3();

    return 0;
}


